package com.gzzn.validate.support;

import com.gzzn.validate.internal.Rule;
import com.gzzn.validate.internal.TestResult;

/**
 * Created by Zhang DP on 14-3-9.
 */
public class IsZhangValidate extends Validate<IsZhangValidate> {
    final static String messageT = "不是zdp";


    //自定义规则
    @Override
    public TestResult doValidate(Object input) {
        final String inputS = String.valueOf(input);
        boolean passed;
        if(inputS.equals("zhangdengpan")){
            passed = true;
        }else {
            passed = false;
        }
        return new TestResult(passed,messageT,Rule.Custom);
    }
}
